import http from "@/axios";
import type {PageBaseResponse} from "@/api/baseResponse";
import type {PageBaseRequest} from "@/api/baseRequest";

enum ApiUrl {
    pageSubscribeUrl = "/subscribe/page"
}

export interface SubscribeResponse {
    clientId: string;
    topic: string;
    qos: number;
}

export interface PageSubscribeRequest extends PageBaseRequest {
    clientId?: string;
}

export function pageSubscribe(data: PageSubscribeRequest) {
    return http.post<PageBaseResponse<SubscribeResponse[]>>(ApiUrl.pageSubscribeUrl, data)
}
